
import "bootstrap/dist/js/bootstrap.bundle";
import "font-awesome/css/font-awesome.min.css";
import "bootstrap/dist/css/bootstrap.min.css";
import _lodash from "lodash";
import theia from "theia-js";
import type { App } from "vue";
import compInst from "./cmpnt";
import $directive from "./data/bind"

import render from "./render";
import "./styles/main.css";

// 定义 install 方法，接收 Vue 作为参数。如果使用 use 注册插件，则所有的组件都将被注册
const install = function (app: App) {


    let ftheia = theia.load();
    app.config.globalProperties.$theia = ftheia;
    app.config.globalProperties.$_ = _lodash;
    window._ = _lodash;
    window.$theia = ftheia;

    for (const [name, directive] of Object.entries($directive)) {
        app.directive(name, directive)
    }

    // 安装用户组件
    compInst.install(app);

    //安装设计组件
    // designer.install(app);
    //安装渲染组件
    render.install(app);

    console.log("xcore 已安装", compInst, render);


};

export default {
    install,
};
